import { RouteRecordRaw, createRouter, createWebHashHistory } from "vue-router"

export const defaultRoutes: RouteRecordRaw[] = [
  { path: '/', redirect:"/home" },
  { path: '/home', name: "home", component: ()=> import("../views/home"), children: undefined },
  { path: '/message', name: "message", component: () => import("../views/message"), children: undefined },
  { path: '/personal', name: "personal", component: ()=> import("../views/personal"), children: undefined },
]

const router = createRouter({
  //  内部提供 history 模式的实现。 
  history: createWebHashHistory(),
  routes: defaultRoutes
})

export default router